package com.bite.system.test.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.bite.system.test.domain.TestDomain;
import com.bite.system.test.mapper.TestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ITestServiceImpl implements ITestService{

    @Autowired
    private TestMapper testMapper;

    @Override
    public List<?> list() {
        return testMapper.selectList(new LambdaQueryWrapper<>());
    }

    @Override
    public String add() {
        TestDomain domain = new TestDomain();
        domain.setTitle("测试");
        domain.setContent("测定雪花主键生成");
        testMapper.insert(domain);
        return "添加成功";
    }
}
